<template>
  <div id="app" v-cloak>
    <van-popup overlay-class="loading-bg" :close-on-click-overlay="false" v-model="show">
      <van-loading type="spinner" color="white" size="50px" />
    </van-popup>
    <router-view/>
  </div>
</template>

<script>
import { Loading, Popup } from "vant";
export default {
  name: "App",
  data() {
    return {
      show: true
    };
  },
  components: {
    "van-loading": Loading,
    "van-popup": Popup
  },
  mounted() {
    setTimeout(() => {
      this.show = false;
    }, 500);
  }
};
</script>

<style lang="scss" scoped>
.van-loading--white {
  padding: 10px;
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.5);
}
/deep/ .loading-bg {
  background-color: transparent;
}
</style>
